package com.atqinke.designpattern.structuraltype.flyweight;

/**
 * @BelongsProject: BasicConnection
 * @BelongsPackage: com.atqinke.DesignPattern.structuraltype.flyweight
 * @Author: NieHk
 * @CreateTime: 2022-08-28  20:21
 * @Description: 俄罗斯方块有不同的形状，我们可以对这些形状向上抽取出AbstractBox，用来定义共同的属性和行为
 * @Version: 1.0
 */
public abstract class AbstractBox {
    public abstract String getShape();

    public void display(String color) {
        System.out.println("方块形状：" + this.getShape() + " 颜色：" + color);
    }
}